﻿#pragma once

#include "Empyrean/Core.h"
#include "spdlog/spdlog.h"
#include "spdlog/sinks/stdout_color_sinks.h"
#include "spdlog/fmt/ostr.h"

namespace Empyrean
{
    class EMPYREAN_API Log
    {
    public:
        static void Init();
        inline static std::shared_ptr<spdlog::logger>& GetCoreLogger() { return s_CoreLogger; }
        inline static std::shared_ptr<spdlog::logger>& GetClientLogger() { return s_ClientLogger; }

    private:
        static std::shared_ptr<spdlog::logger> s_CoreLogger;
        static std::shared_ptr<spdlog::logger> s_ClientLogger;
    };
}

#define LOG_EMP_CORE_TRACE(...)		::Empyrean::Log::GetCoreLogger()->trace(__VA_ARGS__)
#define LOG_EMP_CORE_DEBUG(...)		::Empyrean::Log::GetCoreLogger()->debug(__VA_ARGS__)
#define LOG_EMP_CORE_INFO(...)		::Empyrean::Log::GetCoreLogger()->info(__VA_ARGS__)
#define LOG_EMP_CORE_WARN(...)		::Empyrean::Log::GetCoreLogger()->warn(__VA_ARGS__)
#define LOG_EMP_CORE_ERROR(...)		::Empyrean::Log::GetCoreLogger()->error(__VA_ARGS__)
#define LOG_EMP_CORE_CRITICAL(...)	::Empyrean::Log::GetCoreLogger()->critical(__VA_ARGS__)



#define LOG_EMP_TRACE(...)			::Empyrean::Log::GetClientLogger()->trace(__VA_ARGS__)
#define LOG_EMP_DEBUG(...)			::Empyrean::Log::GetClientLogger()->debug(__VA_ARGS__)
#define LOG_EMP_INFO(...)			::Empyrean::Log::GetClientLogger()->info(__VA_ARGS__)
#define LOG_EMP_WARN(...)			::Empyrean::Log::GetClientLogger()->warn(__VA_ARGS__)
#define LOG_EMP_ERROR(...)			::Empyrean::Log::GetClientLogger()->error(__VA_ARGS__)
#define LOG_EMP_CRITICAL(...)		::Empyrean::Log::GetClientLogger()->critical(__VA_ARGS__)
 